#!/usr/bin/env groovy
import static java.lang.System.*
import static java.util.Date.*
import static javax.swing.JOptionPane.*

def jEdit = Class.forName("org.gjt.sp.jedit.jEdit")
def propsFile = new File(getProperty("user.home") + "/.jedit/properties")

jEdit.newFile(view).insert(0, propsFile.readLines().findAll{
    !(it =~ /.*shortcut=.*/)
}.sort().collect{
    it
}.join("\n"))

